Skip to content

[PWGJE] New code for hadronjet correlations of Jan Janis#16387

Open
fkrizek wants to merge 7 commits into
AliceO2Group:masterfrom
fkrizek:master
Open

[PWGJE] New code for hadronjet correlations of Jan Janis#16387
fkrizek wants to merge 7 commits into
AliceO2Group:masterfrom
fkrizek:master

Conversation

@fkrizek
Copy link
Copy Markdown
Collaborator

@fkrizek fkrizek commented May 26, 2026

This is a code of Jan Janis who is undergrad student of Filip Krizek. Jan will use this code to study hadron jet correlations.

@github-actions github-actions Bot added the pwgje label May 26, 2026
@github-actions github-actions Bot changed the title New code for hadronjet correlations of Jan Janis [PWGJE] New code for hadronjet correlations of Jan Janis May 26, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 26, 2026

O2 linter results: ❌ 1 errors, ⚠️ 0 warnings, 🔕 0 disabled

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for e4c372b at 2026-05-26 10:49:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:510:30: error: 'JTracksTable' has not been declared
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:511:30: error: 'JetsBase' has not been declared
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:512:30: error: 'JetsTag' has not been declared
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:221:103: error: 'setSumw2' was not declared in this scope
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:518:31: error: there are no arguments to 'begin' that depend on a template parameter, so a declaration of 'begin' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:518:31: error: there are no arguments to 'end' that depend on a template parameter, so a declaration of 'end' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:522:31: error: 'trackPt' was not declared in this scope; did you mean 'track'?
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:17: error: capture of non-variable 'TrackJetSpectra::rand'
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:21: error: expected ',' before '->' token
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:21: error: expected identifier before '->' token
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:51: error: expected '{' before ';' token
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:530:32: error: there are no arguments to 'begin' that depend on a template parameter, so a declaration of 'begin' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:530:32: error: there are no arguments to 'end' that depend on a template parameter, so a declaration of 'end' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:779:26: error: no matching function for call to 'TrackJetSpectra::fillMatchedHistograms(const FilteredTracks&, o2::soa::Filtered<o2::soa::Join<o2::soa::Table<o2::aod::Hash<2798090592>, o2::aod::Hash<100195879>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<198532478>, o2::aod::Hash<3712200270>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<4034896057>, o2::aod::Hash<419444554>, o2::aod::Hash<2286545062> > > >&, const FilteredMatchedJetsDetLevel&)'
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:806:33: error: 'maxJetConstituentPt' was not declared in this scope; did you mean 'jetConstituent'?
ninja: build stopped: subcommand failed.

Full log here.

[PWGJE] Please consider the following formatting changes to AliceO2Group#16387
@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for e4c372b at 2026-05-26 10:52:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:510:30: error: 'JTracksTable' has not been declared
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:511:30: error: 'JetsBase' has not been declared
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:512:30: error: 'JetsTag' has not been declared
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:221:103: error: 'setSumw2' was not declared in this scope
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:518:31: error: there are no arguments to 'begin' that depend on a template parameter, so a declaration of 'begin' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:518:31: error: there are no arguments to 'end' that depend on a template parameter, so a declaration of 'end' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:522:31: error: 'trackPt' was not declared in this scope; did you mean 'track'?
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:17: error: capture of non-variable 'TrackJetSpectra::rand'
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:21: error: expected ',' before '->' token
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:21: error: expected identifier before '->' token
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:528:51: error: expected '{' before ';' token
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:530:32: error: there are no arguments to 'begin' that depend on a template parameter, so a declaration of 'begin' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:530:32: error: there are no arguments to 'end' that depend on a template parameter, so a declaration of 'end' must be available [-fpermissive]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:779:26: error: no matching function for call to 'TrackJetSpectra::fillMatchedHistograms(const FilteredTracks&, o2::soa::Filtered<o2::soa::Join<o2::soa::Table<o2::aod::Hash<2798090592>, o2::aod::Hash<100195879>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<198532478>, o2::aod::Hash<3712200270>, o2::aod::Hash<2286545062> >, o2::soa::Table<o2::aod::Hash<4034896057>, o2::aod::Hash<419444554>, o2::aod::Hash<2286545062> > > >&, const FilteredMatchedJetsDetLevel&)'
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGJE/Tasks/trackJetSpectra.cxx:806:33: error: 'maxJetConstituentPt' was not declared in this scope; did you mean 'jetConstituent'?
ninja: build stopped: subcommand failed.

Full log here.

@vkucera vkucera marked this pull request as draft May 26, 2026 08:53
@vkucera
Copy link
Copy Markdown
Collaborator

vkucera commented May 26, 2026

Please test the code properly before opening the PR for review.

Comment thread PWGJE/Tasks/trackJetSpectra.cxx Outdated
Comment thread PWGJE/Tasks/trackJetSpectra.cxx Outdated
Comment thread PWGJE/Tasks/trackJetSpectra.cxx Outdated
Comment thread PWGJE/Tasks/trackJetSpectra.cxx Outdated
Comment thread PWGJE/Tasks/trackJetSpectra.cxx Outdated
Comment thread PWGJE/Tasks/trackJetSpectra.cxx Outdated
@vkucera
Copy link
Copy Markdown
Collaborator

vkucera commented May 26, 2026

Please restore the commit history of this PR and reopen it.

@fkrizek fkrizek reopened this May 26, 2026
@fkrizek fkrizek marked this pull request as ready for review May 26, 2026 13:52
fkrizek added a commit to fkrizek/O2Physics that referenced this pull request May 26, 2026
[PWGJE] Please consider the following formatting changes to AliceO2Group#16387
[PWGJE] Please consider the following formatting changes to AliceO2Group#16387
#include "Common/DataModel/Multiplicity.h"

#include <CommonConstants/MathConstants.h>
#include <Framework/ASoA.h>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please check if all these includes are needed? They were recently cleaned up so you could discuss with vit if these are an updated list


using FilteredCollPartLevelMB = soa::Filtered<soa::Join<aod::JetMcCollisions, aod::BkgChargedMcRhos>>::iterator;

using CollPartLevelMBEfficiency = aod::JetMcCollisions::iterator;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for places where these are only used once you can directly use the table instead of this alias

using namespace o2::framework::expressions;

using FilteredColl = soa::Filtered<soa::Join<aod::JetCollisions, aod::BkgChargedRhos>>::iterator;
using FilteredEventMultiplicity = soa::Filtered<soa::Join<aod::JetCollisions, aod::ZDCMults>>::iterator;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ZDCMult table would not allow you to use the JE derived data. is the information needed?


using FilteredTracksMatch = soa::Filtered<soa::Join<aod::JetTracks, aod::McTrackLabels>>;

using ParticlesFullTable = soa::Join<aod::JetParticles, aod::JMcParticlePIs>;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should remove the PIs tables evrywhere since you dont actually access the original tables


auto mcpjetsPerMCCollision = mcpjets.sliceBy(partJetsPerCollision, collision.mcCollisionId());

fillMatchedHistograms(tracks, mcpjetsPerMCCollision, mcdjets);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this not need a weight?

float detJetPt = jetMatched.pt();

spectra.fill(HIST("hJetPt_resolution"), (partJetPt - detJetPt) / partJetPt, partJetPt, weight);
spectra.fill(HIST("hJetPhi_resolution"), partJet.phi() - jetMatched.phi(), partJetPt, weight);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are not wrapping phi. You should use the constrainAngle function in recodecay

continue;

auto collTracks = tracks.sliceBy(tracksPerJCollision, collision.globalIndex());
spectra.fill(HIST("hNTracksPerCollision"), collTracks.size());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need a weight?

while (bCloseJet) {
iii++;
if (iii > maxRandomConeIterations) {
break;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this loop breaks previous values of randJetPhi are still used in line 495

}

randJetPhi = rand.Uniform(-constants::math::PI, constants::math::PI);
randJetEta = rand.Uniform(-0.5, 0.5);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be a configurable?


// Z coordinate of collision vertex
spectra.add("hVertexZ_NoCut", "z vertex of collisions w/o cut", kTH1F, {{100, -20., 20., "#it{z}_{vertex}"}});
spectra.add("hVertexZ_Cut", "z vertex of collisions w. cut", kTH1F, {{100, -20., 20., "#it{z}_{vertex}"}});
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some histograms like this are never filled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

4 participants